<template>
  <div>
      <h3>题目信息</h3>
      <p>题干</p>
      <Input v-model="value" placeholder="请输入题目标题，不超过20个字" style="width: 300px" />
      <p>题目主题</p>
      <quill-editor 
                  :options="editorOption"
                  ref="content">
      </quill-editor>
      <p>请选择考试类型：</p>
      <Select style="width:200px">
        <Option v-for="(item,index) in examType" :key="index" :value="item.exam_name">{{item.exam_name}}</Option>
      </Select>
      <p>请选择课程类型：</p>
      <Select style="width:200px">
        <Option v-for="(item,index) in subject" :key="index" :value="item.subject_text">{{item.subject_text}}</Option>
      </Select>
      <p>请选择题目类型：</p>
      <Select style="width:200px">
        <Option v-for="(item,index) in questionType" :key="index" :value="item.questions_type_text">{{item.questions_type_text}}</Option>
      </Select>
      <h3>答案信息</h3>
       <quill-editor 
                  class="quill"
                  :options="editorOption"
                  ref="content">
      </quill-editor>
  </div>
</template>

<script>
import {getExamType,getQuestionType,getSubject} from '../../../api/index'
export default {
  data() {
    return {
      examType:[],
      questionType:[],
      subject:[],
    }
  },
  mounted() {
    //考试类型
    getExamType().then(result=>{
      this.examType=result.data
    }),
    //题目类型
    getQuestionType().then(result=>{
      this.questionType=result.data
    }),
    //课程
    getSubject().then(result=>{
      this.subject=result.data
    })
  },
}
</script>

<style>
.ql-editor{
  min-height: 200px;
}
p{
  margin: 10px 0;
}
</style>